//
//  SZCalendarCell.m
//  SZCalendarPicker
//
//  Created by Stephen Zhuang on 14/12/1.
//  Copyright (c) 2014年 Stephen Zhuang. All rights reserved.
//

#import "SZCalendarCell.h"

@implementation SZCalendarCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width / 2.0, self.bounds.size.width / 2.0)];
        [self.contentView addSubview:_backView];
        self.dateLabel = [[UILabel alloc] initWithFrame:self.bounds];
        [self.contentView addSubview:_dateLabel];
        _dateLabel.textAlignment = NSTextAlignmentCenter;
        _dateLabel.font = [UIFont systemFontOfSize:13];
        _backView.layer.cornerRadius = self.bounds.size.width / 4.0;
        _backView.layer.masksToBounds = YES;
        _backView.center = CGPointMake(self.bounds.size.width / 2.0, self.bounds.size.height / 2.0);
    }
    return self;
}

//- (UILabel *)dateLabel
//{
//    if (!_dateLabel) {
//        _dateLabel = [[UILabel alloc] initWithFrame:self.bounds];
//        [_dateLabel setTextAlignment:NSTextAlignmentCenter];
//        [_dateLabel setFont:[UIFont systemFontOfSize:17]];
//        [self addSubview:_dateLabel];
//    }
//    return _dateLabel;
//}
@end
